Skip to content

exec-server: trace RPC notifications#31690

Open
anp-oai wants to merge 1 commit into
codex/exec-server-rpc-span-fieldsfrom
codex/exec-server-notification-spans
Open

exec-server: trace RPC notifications#31690
anp-oai wants to merge 1 commit into
codex/exec-server-rpc-span-fieldsfrom
codex/exec-server-notification-spans

Conversation

@anp-oai

@anp-oai anp-oai commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Why

initialized is the only registered inbound exec-server RPC endpoint that bypasses request tracing, leaving handshake handling absent from server traces.

What

  • Return the canonical notification route name.
  • Wrap notification dispatch in a bounded codex.exec_server.notification server span.
  • Record success, error, and disconnect outcomes without changing request metrics or the wire protocol.

Manual validation

  • just test -p codex-exec-server exec_server_accepts_initialize
  • just test -p codex-exec-server (306 passed, 2 skipped)

Stack

  1. exec-server: standardize JSON-RPC request spans #31687 (exec-server: standardize JSON-RPC request spans #31687, 1/5)
  2. exec-server: trace RPC notifications #31690 (exec-server: trace RPC notifications #31690, this PR, 2/5)
  3. exec-server: trace detached RPC work #31707 (exec-server: trace detached RPC work #31707, 3/5)
  4. exec-server: propagate notification trace context #31729 (exec-server: propagate notification trace context #31729, 4/5)
  5. exec-server: trace terminal RPC notifications #31730 (exec-server: trace terminal RPC notifications #31730, 5/5)

@anp-oai anp-oai force-pushed the codex/exec-server-notification-spans branch from 8ac0e20 to 184bfb9 Compare July 9, 2026 02:23
@anp-oai anp-oai changed the base branch from codex/exec-server-client-rpc-spans to codex/exec-server-rpc-span-fields July 9, 2026 02:23
Comment thread codex-rs/exec-server/src/server/processor.rs Outdated
@anp-oai anp-oai force-pushed the codex/exec-server-notification-spans branch from 184bfb9 to cb7f4cf Compare July 9, 2026 04:00
@anp-oai anp-oai marked this pull request as ready for review July 9, 2026 04:04
@anp-oai

anp-oai commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review in general but also look specifically at the effect of instrumenting the future in the select arm instead of as a variable above

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: cb7f4cf2d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@anp-oai anp-oai force-pushed the codex/exec-server-notification-spans branch from cb7f4cf to 8de3c5a Compare July 9, 2026 06:16
notification_span.record("otel.name", method);
let result = tokio::select! {
result = route(Arc::clone(&handler), notification) => result,
result = route(Arc::clone(&handler), notification).instrument(notification_span.clone()) => result,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: can we instrument the whole notification dispatch here, rather than only the route future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants